// 8种基础类型
const name: string = 'why';
const age: number = 18;
const flag: boolean = true;
const symb: symbol = Symbol('aa');
const u: undefined = undefined;
const nu: null = null;
const obj: object = { name: 'why' };
const big: bigint = 100n;

// 数组
const arr1: number[] = [1, 2, 3];
const arr2: Array<number> = [1, 2, 3];

// 元组
const tuple: [string, number] = ['why', 18];

// 枚举
enum Gender {
  MALE,
  FEMALE
}
const gender: Gender = Gender.MALE;
